import { http } from '@/utils/http'
export interface IFooItem {
  id: string
  name: string
}

/** 获取设施列表 */
/* 
    "data": [
        {
            "id": 5,
            "name": "7号公交站",
            "categoryId": 3,
            "address": "湖北汽车工业学院西门",
            "longitude": 110.728123,
            "latitude": 32.640111,
            "status": 3
        },
*/
export const getFacilityAll = () => {
  return http.get('/api/facility/map')
}

/** 最近报修 */
/* 
    "data": {
        "records": [
            {
                "id": 16,
                "facilityId": 8,
                "userId": 2,
                "description": "123",
                "imageUrl": "/uploads/repair/6a1e32fa-bc39-4723-99db-61921fbb4558.jpg",
                "status": 1,
                "handlerId": null,
                "createTime": "2025-02-25 19:40:57",
                "finishTime": null,
                "handlerName": null,
                "handlerPhone": null
            },
*/
export const getRecentRepair = (current: number, size: number) => {
  return http.get('/api/repair/page', { current, size })
}
